﻿@using Abp.Authorization.Users
@using LyyCMS.Web.Models.Common.Modals
@using LyyCMS.Web.Models.Articles
@model ArticleListViewModel
@{
    Layout = null;
}
<div class="modal fade" id="ArticleModal" tabindex="-1" role="dialog" aria-labelledby="ArticleModalLabel" data-backdrop="static">
    <div class="modal-dialog modal-lg" role="document">
        <div class="modal-content">
            @await Html.PartialAsync("~/Views/Shared/Modals/_ModalHeader.cshtml", new ModalHeaderViewModel(L("CreateNewArticle")))
            <form name="userCreateForm" role="form" class="form-horizontal" enctype="multipart/form-data">
                <div class="modal-body">
                    <ul class="nav nav-tabs" role="tablist">
                        <li class="nav-item">
                            <a class="nav-link active" data-toggle="tab" role="tab" href="#create-article-details">@L("ArticleDetails")</a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link" data-toggle="tab" role="tab" href="#create-article-roles">@L("ArticleCategory")</a>
                        </li>
                    </ul>
                    <div class="tab-content mt-4">
                        <div role="tabpanel" class="tab-pane container active" id="create-article-details">

                            <div class="form-group row required">
                                <label class="col-md-3 col-form-label">@L("Title")</label>
                                <div class="col-md-9">
                                    <input type="text" class="form-control" name="Title" required>
                                </div>
                            </div>
                            <div class="form-group row required">
                                <label class="col-md-3 col-form-label">@L("Source")</label>
                                <div class="col-md-9">
                                    <input type="text" class="form-control" name="Source" required>
                                </div>
                            </div>


                            <div class="form-group row required">
                                <label class="col-md-3 col-form-label">@L("Content")</label>
                                <div class="col-md-9">
                                    <script id="container" name="Content" type="text/plain" style="width:100%;height:200px;">

                                    </script>
                                </div>
                            </div>

                        </div>
                        <div role="tabpanel" class="tab-pane container" id="create-article-roles">
                            <div class="form-group row required">
                                <label class="col-md-3 col-form-label">@L("ArticleCategory")</label>
                                <div class="col-md-9">
                                    <select id="articleCategoryId" name="articleCategoryId">
                                        @if (null != Model.CategoryList)
                                        {
                                            foreach (var parent in Model.CategoryList)
                                            {
                                                <option value="@parent.Id">@parent.Name </option>
                                            }
                                        }

                                    </select>
                                </div>
                            </div>

                        </div>
                    </div>
                </div>
                @await Html.PartialAsync("~/Views/Shared/Modals/_ModalFooterWithSaveAndCancel.cshtml")
            </form>
        </div>
    </div>
</div>
